package io.lckgroup.modules.lck.form.wxgzh;

import io.lckgroup.modules.lck.entity.ShopFoodEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 封装菜品，前端展示
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ShopFoodEntityWxgzhForm implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 菜品ID
     */
    private Long id;
    /**
     * 菜品分类ID
     */
    private Long foodTypeId;
    /**
     * 商家ID
     */
    private Long merchantId;
    /**
     * 菜品名称
     */
    private String foodName;
    /**
     * 描述信息
     */
    private String describeInfo;
    /**
     * 价格
     */
    private BigDecimal price;
    /**
     * 图片URL
     */
    private String imgUrl;
    /**
     * 是否上架:0:下架,1:上架
     */
    private Integer isUpper;
    /**
     * 是否有规格:0:无,1:有
     */
    private Integer isSpecs;
    /**
     * 审核状态，0:,未审核,1:审核通过,2:审核未通过
     */
    private Integer auditState;
    /**
     * 创建时间
     */
    private Date gmtCreate;
    /**
     * 修改时间
     */
    private Date gmtModified;
    /**
     * 规格名称
     */
    private String specsName;
    /**
     * 规格id
     */
    private Long specsId;
    /**
     * 菜品数量
     */
    private Integer count;

    public ShopFoodEntityWxgzhForm(ShopFoodEntity entity) {
        this.setId(entity.getId());
        this.setFoodTypeId(entity.getGoodsTypeId());
        this.setMerchantId(entity.getMerchantId());
        this.setFoodName(entity.getGoodsName());
        this.setDescribeInfo(entity.getDescribeInfo());
        this.setPrice(entity.getPrice());
        this.setImgUrl(entity.getImgUrl());
        this.setIsUpper(entity.getIsUpper());
        this.setIsSpecs(entity.getIsSpecs());
        this.setGmtCreate(entity.getGmtCreate());
        this.setGmtModified(entity.getGmtModified());
    }
}
